
let _data=[
    {
        id:0,
        data:[
            {itemName:'书籍查询',url:'/homepage/bookadd'},
            {itemName:'书籍添加',url:'/homepage/bookadd'},
            {itemName:'书籍注销',url:'/homepage/bookremove'},
            {itemName:'书籍丢失',url:'/homepage/booklost'},
            {itemName:'书籍采购',url:'/homepage/booklost'},
        ],
    }, {
        id:1,
        data:[
            {itemName:'学生查询',url:'/homepage/bookborrowing'},
            {itemName:'学生添加',url:'/homepage/bookborrowing'},
            {itemName:'学生注销',url:'/homepage/bookborrowing'},
            {itemName:'学生违规记录',url:'/homepage/bookborrowing'},
        ],

    }, {
        id:2,
        data:[
            {itemName:'书籍借阅',url:'/homepage/bookborrowing'},
            {itemName:'书籍续借',url:'/homepage/bookrenewal'},
            {itemName:'书籍归还',url:'/homepage/bookreturn'},
        ],

    }, {
        id:3,
        data:[
            {itemName:'超期查询',url:'/homepage/readersquery'},
            {itemName:'超期处理',url:'/homepage/readersquery'},
        ],

    }, {
        id: 4,
        data: [
            {itemName: '罚款查询', url: '/homepage/readersquery'},
            {itemName: '罚款更改', url: '/homepage/readersquery'},
            {itemName: '罚款缴纳', url: '/homepage/readersquery'},
        ],
    }, {
        id:5,
        data:[
            {itemName:'图书清算录入列表',url:'/homepage/borrowquery'},
            {itemName:'图书清算录入',url:'/homepage/borrowquery'},
            {itemName:'图书清算结果',url:'/homepage/borrowquery'},
        ],

    }, {
        id:6,
        data:[
            {itemName:'管理员查询',url:'/homepage/overduequery'},
            {itemName:'管理员打卡记录',url:'/homepage/overduequery'},
        ],
    }, {
        id:7,
        data:[
            {itemName:'反馈记录',url:'/homepage/overduequery'},
        ],
    }
];
const sidebarqh=(state=_data[0],action)=>{
    switch(action.type){
        case 'SIDEBAR_QH':
                let _obj=_data.filter(todo=>todo.id===action.id);
                return Object.assign({},_obj[0],{isdisplay:true});
        default: return Object.assign({},state,{isdisplay:true});
    }
};
export default sidebarqh;